import request from "@/utils/request";

/**
 * 查询公共报表列表
 * @returns
 */
export function getReportListApi (id, key) {
	return request({
		url: '/public/report/' + id,
		method: 'get',
		params: {key: key},
	})
}


/**
 * 查询公共报表详情
 * @returns
 */
export function getReportDetailApi (id, key) {
	return request({
		url: '/public/report/' + id + '/detail',
		method: 'get',
		params: {key: key},
	})
}


/**
 * 查询数据集数据
 * @returns
 */
export function getDatasetDataApi (id, key, filter) {
	return request({
		url: '/public/dataset/' + id + '/data',
		method: 'post',
		params: {key: key},
		data: filter
	})
}

/**
 * 查询数据集数据
 * @returns
 */
export function getFilterValueApi (reportId, filterId, query) {
	return request({
		url: '/public/report/' + reportId + '/filter/' + filterId + '/value',
		method: 'get',
		params: query,
	})
}
